package org.jeecg.modules.monitoring.j_monitoring.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.monitoring.j_monitoring.entity.RealStorage;
import org.jeecg.modules.monitoring.j_monitoring.entity.RealStorageLun;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Description: 实际存储LunMapper
 * @Author: xiaoyq
 * @Date:   2023-11-22
 * @Version: V1.0
 */
public interface RealStorageLunMapper extends BaseMapper<RealStorageLun> {
    /**
     * 删除FDN对应的存储
     * @param fdn
     * @return
     */
    int deleteByFdnAndName(@Param("fdn") String fdn, @Param("name") String name);

    /**
     * 查询Fdn的存储资源
     *
     * @param fdn
     * @return
     */
    List<RealStorageLun> selectByFdn(@Param("fdn") String fdn);

    BigDecimal selectUsedByFdn(@Param("fdn") String fdn);
}
